﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcApplication2.Models.ThemSanPhamModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    ThemSanPham
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<div class='Khung'>Thêm sản phẩm</div> <br />
    <div class="DangKyNoiDung">
    <%using (Html.BeginForm("ThemSanPham", "Product", FormMethod.Post, new { enctype = "multipart/form-data" }))
      { %>
        <div class="error"><%=Html.DisplayFor(r=>r.Error) %></div><br/>
        <table cellpadding="0" cellspacing="0" width="100%" style="border-collapse:collapse">
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.TenSanPham)%></div>
                </td>
                <td>
                    <%=Html.TextBoxFor(r => r.SanPham.TenSanPham, new { @class = "DangKyControl"})%>
                    <%=Html.ValidationMessageFor(r => r.SanPham.TenSanPham, null, new { @class="error"})%>
                </td>
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.IdLoaiSanPham)%></div>
                </td>
                <td>
                    <%=Html.DropDownListFor(r=>r.SanPham.IdLoaiSanPham,new SelectList(Model.LoaiSanPhamList,"ID","TenLoaiSanPham"),new { @class = "DangKyControl"}) %>
                    <%=Html.ValidationMessageFor(r => r.SanPham.IdLoaiSanPham, null, new { @class="error"})%>
                </td>
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.Gia)%></div>
                </td>
                <td>
                    <%=Html.TextBoxFor(r=>r.SanPham.Gia,new { @class = "DangKyControl",id="numeric"}) %>
                    <%=Html.ValidationMessageFor(r => r.SanPham.Gia, null, new { @class="error"})%>
                </td>
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.SoLuong)%></div>
                </td>
                <td>
                    <%=Html.TextBoxFor(r=>r.SanPham.SoLuong,new { @class = "DangKyControl",id="numeric1"}) %>
                    <%=Html.ValidationMessageFor(r => r.SanPham.SoLuong, null, new { @class="error"})%>
                </td>
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.DiemThuong)%></div>
                </td>
                <td>
                    <%=Html.TextBoxFor(r=>r.SanPham.DiemThuong,new { @class = "DangKyControl",id="numeric2"}) %>
                </td>
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.ThoiGianBatDauBan)%></div>
                </td>
                <td>
                    <%=Html.TextBoxFor(r=>r.SanPham.ThoiGianBatDauBan,new { @class = "DangKyControl",id="datepicker"}) %>
                    <%=Html.ValidationMessageFor(r => r.SanPham.ThoiGianBatDauBan, null, new { @class="error"})%>
                </td>
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.ThoiGianKetThucBan)%></div>
                </td>
                <td>
                    <%=Html.TextBoxFor(r=>r.SanPham.ThoiGianKetThucBan,new { @class = "DangKyControl",id="datepicker1"}) %>
                    <%=Html.ValidationMessageFor(r => r.SanPham.ThoiGianKetThucBan, null, new { @class="error"})%>
                </td>
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.ThoiGianBatDauNhanHang)%></div>
                </td>
                <td>
                    <%=Html.TextBoxFor(r=>r.SanPham.ThoiGianBatDauNhanHang,new { @class = "DangKyControl",id="datepicker2"}) %>
                    <%=Html.ValidationMessageFor(r => r.SanPham.ThoiGianBatDauNhanHang, null, new { @class="error"})%>
                </td>
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.ThoiGianKetThucNhanHang)%></div>
                </td>
                <td>
                    <%=Html.TextBoxFor(r=>r.SanPham.ThoiGianKetThucNhanHang,new { @class = "DangKyControl",id="datepicker3"}) %>
                    <%=Html.ValidationMessageFor(r => r.SanPham.ThoiGianKetThucNhanHang, null, new { @class="error"})%>
                </td>
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.DiemNhanThuong)%></div>
                </td>
                <td>
                    <%=Html.TextBoxFor(r=>r.SanPham.DiemNhanThuong,new { @class = "DangKyControl",id="numeric3"}) %>
                </td>
            </tr>
            <tr>
				<td style="height: 10px"></td>
		    </tr>
            <tr>
                <td width="20%">
                    <div class="DangKyLabel"><%=Html.LabelFor(r => r.SanPham.HinhAnh)%></div>
                </td>
                <td>
                    <div class="DangKyControl"><input type="file" name="file" id="file" /></div>
                </td>
            </tr>
        </table>
        <br /><br />
        <input type="submit" name="btnThem" value="Thêm" />
        <input type="reset" name="btnClear" value="Clear" />
    <br />
    <%}%> 
    </div><br />

</asp:Content>
